navHover = function() { 
var lis = document.getElementById("navmenu").getElementsByTagName("LI"); 
for (var i=0; i<lis.length; i++) { 
lis[i].onmouseover=function() { 
this.className+=" iehover"; 
} 
lis[i].onmouseout=function() { 
this.className=this.className.replace(new RegExp(" iehover\\b"), ""); 
} 
} 
} 
if (window.attachEvent) window.attachEvent("onload", navHover); 

/*---弹出层（不可关闭）---*/
function ShowPanel()
{
	document.getElementById('light').style.display='block'; 
	document.getElementById('fade').style.display='block';
}

/*---弹出层---*/

function show(){
	var iWidth = document.documentElement.clientWidth;
	var iHeight = document.documentElement.clientHeight;
	var bgObj = document.createElement("div");
	bgObj.setAttribute("id","bgbox");
	bgObj.style.width = iWidth+"px";
	bgObj.style.height =Math.max(document.body.clientHeight, iHeight)+"px";
	document.body.appendChild(bgObj);
	var oShow = document.getElementById('show');
	oShow.style.display = 'block';
	oShow.style.left = (iWidth-702)/2+"px";
	oShow.style.top = (iHeight-602)/2+"px";
	var oClosebtn = document.createElement("span");
	oClosebtn.innerHTML = "×";
	oShow.appendChild(oClosebtn);
	function oClose(){
	oShow.style.display = 'none';
	document.body.removeChild(bgObj);
	oShow.removeChild(oClosebtn);
	}
	oClosebtn.onclick = oClose;
	bgObj.onclick = oClose;
	function getEvent() {
	return window.event || arguments.callee.caller.arguments[0];
	}
	document.onkeyup = function(){
	var event = getEvent();
	if (event.keyCode == 27){
	oClose();
	}
	}
	var moveX = 0;
	var moveY = 0;
	var moveTop = 0;
	var moveLeft = 0;
	var moveable = false;
	var docMouseMoveEvent = document.onmousemove;
	var docMouseUpEvent = document.onmouseup;
	titleBar =  document.getElementById('titlebar');
	titleBar.onmousedown = function() {
	var evt = getEvent();
	moveable = true;
	moveX = evt.clientX;
	moveY = evt.clientY;
	moveTop = parseInt(oShow.style.top);
	moveLeft = parseInt(oShow.style.left);
	document.onmousemove = function() {
		if (moveable) {
						var evt = getEvent();
						var x = moveLeft + evt.clientX - moveX;
						var y = moveTop + evt.clientY - moveY;
						if ( x > 0 &&( x + 302 < iWidth) && y > 0 && (y + 202 < iHeight) ) {
								oShow.style.left = x + "px";
								oShow.style.top = y + "px";
																							}
						}
		};
	document.onmouseup = function () {
			if (moveable) {
							document.onmousemove = docMouseMoveEvent;
							document.onmouseup = docMouseUpEvent;
							moveable = false;
							moveX = 0;
							moveY = 0;
							moveTop = 0;
							moveLeft = 0;
							}
					};
			}
	}
/*--- 右键菜单---*/

if(!document.all) document.captureEvents(Event.MOUSEDOWN); 
var _Tmenu = 0; 
var _Amenu = 0; 
var _Type = 'A,INPUT,DIV,BODY,IMG'; 
var _Menu  = "null";
document.onclick = _Hidden; 
function _Hidden() 
{ 
	if(_Tmenu==0) return; 
	document.getElementById(_Tmenu).style.visibility='hidden'; 
	_Tmenu=0; 
} 

document.oncontextmenu = function (e) 
{ 
	_Hidden(); 
	var _Obj = document.all ? event.srcElement : e.target; 
	if(_Type.indexOf(_Obj.tagName) == -1) return; 
	_Amenu = _Obj.getAttribute('menu'); 
	if(_Amenu == 'null') return; 
	if(document.all) e = event; 
	_ShowMenu(_Amenu, e); 
	return false; 
} 
function _ShowMenu(Eid, event) 
{ 
	_Menu = document.getElementById(Eid); 
	
	var _Left = event.clientX + document.body.scrollLeft; 
	var _Top = event.clientY + document.body.scrollTop; 
	_Menu.style.left = _Left.toString() + 'px'; 
	_Menu.style.top = _Top.toString() + 'px'; 
	_Menu.style.visibility = 'visible'; 
	_Tmenu = Eid; 
	_Menu.onclick = transfer;
	_Menu.oncontextmenu = no_context_menu;
} 

function transfer(e){
	e=e||window.event;e.cancelBubble=true;				
}

function no_context_menu(e){
	e=e||window.event;
	e=e||window.event;e.cancelBubble=true;
	return;				
}



function checkDel()
{
	return confirm('确定要删除吗？此过程不可逆！');
}